/**  
 * @project_name yjd_back
 * @Title: CashoutStatus.java
 * @Package com.yjd.back.enums
 * @Description: TODO
 * @author lindy lindytem@126.com  
 * @date 2014-9-2 上午9:19:32
 * @version V1.0  
 * <b>Copyright (c)</b> 2014医信金融信息服务（上海）有限公司-版权所有<br/>
 */
package com.yjd.comm.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.yjd.comm.service.IEnumFilterService;

/**
 * @ClassName: CashoutStatus
 * @Description: TODO
 * @author lindy lindytem@126.com
 * @date 2014-9-2 上午9:19:32
 */
public enum CashoutStatus {

	apply(1, "待审核"), check(2, "待打款"), cashout(3, "已打款"), cashfinish(4, "提现完成"), refuse(-1, "已拒绝"), cancel(
			-2, "已撤销"), cash_finish_fail(-3, "提现退回"), cash_finish_fail_fee(-4, "提现退回(扣除手续费)"), cash_call_check(90, "电调中（审核)"), cash_call_pay(91, "电调中（审核)");

	private CashoutStatus(int code, String label) {
		this.code = code;
		this.label = label;
	}

	public static List<Map<Object, Object>> list(IEnumFilterService filter) {
		List<Map<Object, Object>> list = new ArrayList<Map<Object, Object>>();
		Map<Object, Object> statusConllection = null;
		for (CashoutStatus status : CashoutStatus.values()) {
			if (filter.filter(status.getCode())) {
				statusConllection = new HashMap<Object, Object>();
				statusConllection.put("code", status.getCode());
				statusConllection.put("label", status.getLabel());
				list.add(statusConllection);
			}
		}
		return list;
	}

	private int code;

	private String label;

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}


}
